#include <stdio.h>

int main() 
{
    int num; 
    scanf("%d", &num);

    int reversedNum = 0;

    while (num!= 0) 
	{
        reversedNum = reversedNum * 10 + num % 10; 
        num /= 10; 
    }

    printf("%d\n", reversedNum);  

    return 0;
}
